<#include "tree.html"/>
<SCRIPT type="text/javascript">
	$(document).ready(function(){
		var ztree = $.fn.zTree.init($(document.getElementById("zTree_adminLIst")), setting, zNodes1);
		ztree.selectNode(ztree.getNodeByParam("id", "${type!''}", null));
	});
	
	function exportlog(){
		<#if type??>
		$("#logform").attr("action","/${orgi}/manage/log/log/${type}/operationLogExport.html");
		$("#logform").submit();
		<#else>
		$("#logform").attr("action","/${orgi}/manage/log/log/exprotCSV.html");
		$("#logform").submit();
		</#if>
	}
	
	function submitSearchForm(action){
		$("#logform").attr("action","/${orgi}/manage/log/logbus/${type}.html");
		$("#beginNum").val($("#beginNumShow").val());
		$("#endNum").val($("#endNumShow").val());
	//	$("#username").val($("#show_username").val());
		$("#action").val(action);
		$("#logform").submit();
	} 
</SCRIPT>

<div class="rs_layout_top breadCrumbWrap">
	<div class="breadCrumbStart">您当前的位置是在：</div>
	<ul class="breadCrumb">
		<li class="bc_ithems"><a href="/${orgi}/manage/index.html">欢迎</a></li>
	</ul>
	<form id="logform" action="" method="post" data-toggle="form">
	<#include "search.html"/>
	<input type="hidden" id="beginNum" name="beginNum" value="">
	<input type="hidden" id="endNum" name="endNum" value="">
	<input type="hidden" id="action" name="action" value="current">
	</form>
</div>
<div class="rs_layout_left" resizable="true" style="width:230px;">
	<div class="lftTreeWrap">
		<div class="ztree" id="zTree_adminLIst"></div>
	</div>
</div>
<!--<div class="rs_layout_right" style="width:300px;"></div>-->
<div class="rs_layout_center">
	<div class="rs_layout">
		<div class="rs_layout_center">
			<div class="tableScrollWrap">
			     <input type="hidden" id="beginNum" name="beginNum" value="">
				 <input type="hidden" id="endNum" name="endNum" value="">
				 <input type="hidden" id="action" name="action" value="current">
				 <table class="table_style_1">
					<thead>
						<tr>
							<th class="minSize"></th>
							<th><i class="verMidWrap">请求URL</i></th>
							<th class="minSize"><i class="verMidWrap">请求时间</i></th>
							<th class="minSize"><i class="verMidWrap">客户端地址</i></th>
							<th class="minSize"><i class="verMidWrap">操作用户</i></th>
							<th class="minSize"><i class="verMidWrap">执行状态</i></th>
							<th><i class="verMidWrap">执行时间</i></th>
							
						</tr>
					</thead>
					<tbody>
						<#if loglist??>
						<#list loglist as log>
						<tr>
							<td class="tdIcons"><i class="icons_tablelist icons_tablelist_request" title="系统"></i></td>
							<td>${log.url}</td>
							<td class="minSize">${log.createdate?string('yyyy-MM-dd HH:mm:ss')}</td>
							<td class="minSize">${log.ip!''}</td>
							<td class="minSize"><#if log.userid??&&log.username!='Guest'><a id="updateUsers" data-width="565" title="修改用户" href="/${orgi}/manage/account/updateuser/${log.userid!''}.html?url=/rivues/manage/log/logbus/${Request["type"]}.html" data-toggle="ajax">${log.username!""}（${log.usermail!''}）</a><#elseif log.username??&&log.username!='Guest'>${log.username!""}<#else>未知用户</#if></td>
							<td class="minSize" style="text-align:center;"><#if log.error == "true"><i class="icons_tablelist icons_tablelist_error" title="执行失败"></i><#else><i class="icons_tablelist icons_tablelist_succes" title="执行成功"></i></#if></td>
							<td class="minSize"><pre>${log.querytime/1000.0}秒</pre></td>
						</tr>
						</#list>
						</#if>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
<div class="rs_layout_bottom toolBar_bottom" style="overflow: hidden">
<div class="papers_1" style="float:left;line-height:18px;margin:0 10px 0 500px;">
				<span ><label style="font-size: 13px;">条目&nbsp;&nbsp;&nbsp;&nbsp;</label><input type="text" style="width: 30px;height: 10px;" id="beginNumShow" value="${beginNum!'1'}"/><label style="font-size: 13px;">-</label><input style="width: 30px;height: 10px;" type="text" id="endNumShow" value="${endNum!'20'}"/></span>
				<img class="pageElems" onclick="submitSearchForm('current');" title="查询" alt="查询" src="/assets/images/action_go.gif"/>
				<img class="pageElems" onclick="submitSearchForm('first');" title="首页" alt="首页" src="/assets/images/go-first-view.png"/>
				<img class="pageElems" onclick="submitSearchForm('last');" title="上一页" alt="上一页" src="/assets/images/go-previous-view.png"/>			
				<img class="pageElems" onclick="submitSearchForm('next');" title="下一页" alt="下一页" src="/assets/images/go-next-view.png"/>
				<img class="pageElems" onclick="submitSearchForm('final');" title="尾页" alt="尾页" src="/assets/images/go-last-view.png"/>
</div>
</div>